package com.my.bbs.service.impl;

import com.my.bbs.dao.MyPostCategoryMapper;
import com.my.bbs.entity.MyPostCategory;
import com.my.bbs.service.MyPostCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(rollbackFor = Exception.class)
public class MyPostCategoryServiceImpl implements MyPostCategoryService {

    @Autowired
    private MyPostCategoryMapper myPostCategoryMapper;

    @Override
    public List<MyPostCategory> getMyPostCategories() {
        return myPostCategoryMapper.getMyPostCategories();
    }

    @Override
    public MyPostCategory selectById(Integer categoryId) {
        return myPostCategoryMapper.selectByPrimaryKey(categoryId);
    }
}
